package org.bigjava.novelplatform.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.bigjava.novelplatform.common.enums.SigningState;
import org.hibernate.validator.constraints.URL;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 
 * @TableName writer
 */
@TableName(value ="writer")
@Data
public class Writer implements Serializable {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 注册为作者的时间
     */
    private Date registerWriterTime;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 声望
     */
    private Integer prestige;

    /**
     * 书籍数
     */
    private Integer booksCount;

    /**
     * 字数
     */
    private Integer wordCount;

    /**
     * 全部收益
     已扣除手续费
     */
    private BigDecimal earnings;

    /**
     * 未支付收益
     */
    private BigDecimal unpaidEarnings;

    /**
     * 已支付收益
     */
    private BigDecimal paidEarnings;

    /**
     * 签约状态
     0未签约；1已签约
     */
    private SigningState signing;

    /**
     * 协议url
     */
    @URL
    private String signingUrl;

    /**
     * 积分
     由用户打赏获得<br />定期重置
     */
    private Long integral;

    /**
     * 打赏手续费比例
     */
    private BigDecimal serviceCharge;

    /**
     * 正在连载书籍id
     */
    private Integer continuedBookId;

    /**
     * 逻辑删除
     0未删除；1删除
     */
    private Integer deleteState;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}